﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ppt = Microsoft.Office.Interop.PowerPoint;

namespace ObjectModel.PowerPoint
{
    public static class ResolvableObjectFactory
    {
        public static ResolvableObject CreateObject(object o)
        {
            if (o is Ppt.Slide)
                return new ResolvableSlide((Ppt.Slide)o);
            if (o is Ppt.Shape)
                return new ResolvableShape((Ppt.Shape)o);
            if (o is Ppt.TextRange)
                return new ResolvableTextRange((Ppt.TextRange)o);
            else
                throw new ArgumentOutOfRangeException();
        }
    }
}
